'use strict';

angular.module('browser_app')
    .controller('browser_app', ['$scope', '$window', '$document',
        function($scope, $window, $document) {
            $scope.open_shopping_cart = function(e) {
                $(".shopping-Cart-list").show();
                e.stopPropagation();
            }

            $scope.open_search_keyword = function(e) {
                $(".search-keyword").show();
                e.stopPropagation();
            }

            $scope.back_top = function() {
                $('body,html').animate({ scrollTop: 0 }, 1000);
            }

            $document.on("click", function() {
                $(".search-keyword").hide();
                $(".shopping-Cart-list").hide();
            });
        }
    ]);